package com.juc.threadPoolExecutor.threadPoolExecutor8;
/**
 * 
 * 方法awaitTermination(long timeout,TimeUnit unit)
 * 作用:查看在指定时间之内，线程池是否已经终止工作，
 * 也就是最多等待多少时间后去判断线程线程池是否已经
 * 终止工作.
 * 此方法要有shutdown()方法的配合
 *
 */
public class MyRunnable1 implements Runnable{

	@Override
	public void run() {
		try {
			System.out.println(Thread.currentThread().getName() + " begin " + System.currentTimeMillis());
			Thread.sleep(4000);
			System.out.println(Thread.currentThread().getName() + " end " + System.currentTimeMillis());
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
